package com.gitee.huanminabc.db_freedom.segments;

import com.gitee.huanminabc.db_freedom.utils.SqlFunction;
import com.gitee.huanminabc.db_freedom.wrapper.AbstractSqlWrapper;

/**
 * 组合实现类
 * @param <T>
 * @param <Children>
 */
public abstract class SqlCombineImplSegments  <T, Children extends AbstractSqlWrapper<T, Children>>    extends AbstractSqlWrapper<T, Children> implements SqlCombineSegments<Children, T, SqlFunction<T, ?>> {
    public SqlCombineImplSegments() {
    }

    public SqlCombineImplSegments(Class<?> entityClass, com.gitee.huanminabc.db_freedom.wrapper.SQL sql) {
        super(entityClass, sql);
    }

    @Override
    public Children LEFT_JOIN() {
        SQL().append(" LEFT JOIN ");
        return typedThis;
    }

    @Override
    public Children RIGHT_JOIN() {
        SQL().append(" RIGHT JOIN ");
        return typedThis;
    }

    @Override
    public Children INNER_JOIN() {
        SQL().append(" INNER JOIN ");
        return typedThis;
    }

    @Override
    public Children ON() {
        SQL().append(" ON ");
        return typedThis;
    }

    @Override
    public Children UNION() {
        SQL().append(" UNION ");
        return typedThis;
    }

    @Override
    public Children UNION_ALL() {
        SQL().append(" UNION ALL ");
        return typedThis;
    }

}
